package com.zzt.zt_hilt

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.zzt.zt_hilt.container.AppContainer
import com.zzt.zt_hilt.container.LoginContainer
import com.zzt.zt_hilt.entity.LoginUserData
import com.zzt.zt_hilt.vm.LoginViewModel

class TestActivityV5 : AppCompatActivity() {
    private lateinit var loginViewModel: LoginViewModel
    private lateinit var loginData: LoginUserData
//    private lateinit var appContainer: AppContainer
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_test_v5)
//        appContainer = (application as MyApplication).appContainer

        // Login flow has started. Populate loginContainer in AppContainer
//        appContainer.loginContainer = LoginContainer(appContainer.userRepository)

//        loginViewModel = appContainer.loginContainer!!.loginViewModelFactory.create()
//        loginData = appContainer.loginContainer!!.loginData
    }

    override fun onDestroy() {
        // Login flow is finishing
        // Removing the instance of loginContainer in the AppContainer
//        appContainer.loginContainer = null
        super.onDestroy()
    }
}